import { IFeidaoAiNodejsComponent } from '@dfeidao/atom-nodejs/interfaces';
import nodejs from '@dfeidao/atom-nodejs/msg/nodejs';
import render from '@dfeidao/atom-nodejs/render/render';
import p001 from './p001';
import p002 from './p002';

export default async function na001(fd: IFeidaoAiNodejsComponent) {
	// todo
	const res = await nodejs<{ dt: Array<{}>; t: number }>(fd.data.actionid, fd.data.sessionid, 'company-factory/zj-000004/s001', {
		filter: {
			company_name: '',
			corporate: '',
			pn: 1
		}
	});
	console.log(res);
	render(fd.data.node, res.dt, p001, 'p001');
	render(fd.data.node, res.t, p002, 'p002');
}
